<%--
  Created by IntelliJ IDEA.
  User: wen
  Date: 2018/7/10
  Time: 13:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>忘记密码</title>
    <script type="text/javascript"  src="/js/jquery-2.1.3.min.js"></script>
    <script type="text/javascript">
        function getQuestion() {
            var name = $("#username").val();
            $.ajax({
                type: "POST",
                url: "/user/get_question.do",
                data:{username:name},
                success: function(data){
                    if(data.status == 0){
                         alert(data.data);
                        $("#question").text(data.status)
                        $("#p").text(data.data)
                    }else {
                        alert(data.msg);
                    }
                }
            });
        }

    </script>
</head>
<body>
用户名：<input type="text" id="username"><input type="submit" id="getQuestion" onclick="getQuestion()" value="获取问题"><br>
问  题：<input type="text" id="question"><p id="p"></p>

答  案：<input type="text" id="answer"><br>
<input type="submit" value="提交" onclick="">
</body>
</html>
